Introduction

Purpose

The purpose is to build a supply chain model for mixpace operation group. Most of the chains are expected to be only one stage considering most of the problems are inventory problems, with barely no need for secondary production or distribution.

Data and Methods

The expected datasets and the corresponding varibales are described as below.

  1. X1: Demand w/ Period
  2. X1: Production Delay
  3. X1: Materials Defects Percentage
  4. X1: Delivery Delay
  5. X1: Value
  6. X1: Holding Cost
  7. X1: Product Cost

Database Codebook

Analysis

Load Package

The following packages are employed:

  • plyr
  • ggplot2
  • fitdistrplus
  • GGally
  • lubridate
  • mediation

Load Data

The following datasets are included:

Process Data

The Initial formatted dataset is data_feiyuan_528. The cleaned dataset are data_feiyuan_usage_s, data_feiyuan_add_s and data_feiyuan_storage_s.

Try Roll Tissue

##   NO         Item Amount       Date Week    Type Storage Period
## 1  1 擦手纸(包)     60 2018-03-20    1 Storage      60      1
## 2  1 擦手纸(包)    100 2018-03-26    1     Add     160      1
## 3  1 擦手纸(包)     29 2018-04-02    1     Use     131      1
## 4  1 擦手纸(包)     28 2018-04-09    2     Use     103      1
## 5  1 擦手纸(包)     27 2018-04-16    3     Use      76      1
## 6  1 擦手纸(包)     34 2018-04-23    4     Use      42      1
##  [1] "NO"                     "Item"                  
##  [3] "Demand_avg"             "Demand_sd"             
##  [5] "Lead_time"              "Safety_stock_week_Exp" 
##  [7] "Safety_stock_month_Exp" "Safety_stock_month_Cur"
##  [9] "Conf_intv"              "Price"
##   NO                               Item       Demand_avg         Demand_sd
## 1  1                       擦手纸(包)           29.625  3.62284418654736
## 2 10           小垃圾袋(50*60)50只/卷 1.83333333333333 0.752772652709081
## 3 11 滴露Dettol 滋润倍护 健康抑菌洗手液                2              <NA>
## 4 12 滴露 滋润倍护 健康抑菌洗手液补充装               37              <NA>
## 5 13                 感应式洗手液补充装              NaN              <NA>
## 6 14           惠润淡雅果香沐浴露 650ml                1                 0
##   Lead_time Safety_stock_week_Exp Safety_stock_month_Exp
## 1         4      11.9553858156063       47.8215432624252
## 2         4      2.48414975393997       9.93659901575988
## 3         4                  <NA>                   <NA>
## 4         4                  <NA>                   <NA>
## 5         4                  <NA>                   <NA>
## 6         4                     0                      0
##   Safety_stock_month_Cur Conf_intv  Price
## 1                     42      0.95 130.00
## 2                      7      0.95   5.70
## 3                     -2      0.95  21.38
## 4                     23      0.95  15.68
## 5                      0      0.95  38.70
## 6                      0      0.95  48.00
## 'data.frame':    46 obs. of  10 variables:
##  $ NO                    : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ Item                  : chr  "擦手纸(包)" "清风简装200抽面巾纸(包)" "卷筒纸(卷)" "一次性杯子" ...
##  $ Demand_avg            : num  29.6 1 107.9 1 1 ...
##  $ Demand_sd             : num  3.62 0 12.71 NA NA ...
##  $ Lead_time             : num  4 4 4 4 4 4 4 4 4 4 ...
##  $ Safety_stock_week_Exp : num  12 0 41.9 NA NA ...
##  $ Safety_stock_month_Exp: num  47.8 0 167.8 NA NA ...
##  $ Safety_stock_month_Cur: num  42 -1 281 1 6 3 3 0 1 7 ...
##  $ Conf_intv             : num  0.95 0.95 0.95 0.95 0.95 0.95 0.95 0.95 0.95 0.95 ...
##  $ Price                 : num  130 3.8 17.6 8 NA ...
## 'data.frame':    46 obs. of  14 variables:
##  $ NO                    : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ Item                  : chr  "擦手纸(包)" "清风简装200抽面巾纸(包)" "卷筒纸(卷)" "一次性杯子" ...
##  $ Demand_avg            : num  29.6 1 107.9 1 1 ...
##  $ Demand_sd             : num  3.62 0 12.71 NA NA ...
##  $ Lead_time             : num  4 4 4 4 4 4 4 4 4 4 ...
##  $ Safety_stock_week_Exp : num  12 0 41.9 NA NA ...
##  $ Safety_stock_month_Exp: num  47.8 0 167.8 NA NA ...
##  $ Safety_stock_month_Cur: num  42 -1 281 1 6 3 3 0 1 7 ...
##  $ Conf_intv             : num  0.95 0.95 0.95 0.95 0.95 0.95 0.95 0.95 0.95 0.95 ...
##  $ Price                 : num  130 3.8 17.6 8 NA ...
##  $ Safety_stock_Days_Exp : num  11.3 0 10.9 NA NA ...
##  $ Safety_stock_Val_Exp  : num  6217 0 2944 NA NA ...
##  $ Safety_stock_Val_Cur  : num  5460 -3.8 4931.6 8 NA ...
##  $ Safety_stock_Days_Cur : num  9.92 -7 18.23 7 42 ...
##    NO Safety_stock    Type
## 1   1         6216 Optimal
## 12  2            0 Optimal
## 23  3         2944 Optimal
## 34  4           NA Optimal
## 42  5           NA Optimal
## 43  6           NA Optimal
##    NO Safety_stock     Type
## 1   1         5460 Previous
## 12  2           -3 Previous
## 23  3         4931 Previous
## 34  4            8 Previous
## 42  5           NA Previous
## 43  6           NA Previous
##    NO Safety_stock    Type
## 1   1         6216 Optimal
## 12  2            0 Optimal
## 23  3         2944 Optimal
## 34  4           NA Optimal
## 42  5           NA Optimal
## 43  6           NA Optimal
## 44  7          279 Optimal
## 45  8           NA Optimal
## 46  9          178 Optimal
## 2  10           56 Optimal
## 3  11           NA Optimal
## 4  12           NA Optimal
## 5  13           NA Optimal
## 6  14            0 Optimal
## 7  15            0 Optimal
## 8  16           NA Optimal
## 9  17           NA Optimal
## 10 18           NA Optimal
## 11 19           NA Optimal
## 13 20           NA Optimal
## Warning: Removed 41 rows containing missing values (geom_bar).
## Warning: Removed 41 rows containing missing values (geom_text).

##    NO                      Item Demand_avg Demand_sd Lead_time
## 1   1              擦手纸(包)     29.625  3.622844         4
## 12  2 清风简装200抽面巾纸(包)      1.000  0.000000         4
## 23  3              卷筒纸(卷)    107.875 12.710373         4
## 34  4                一次性杯子      1.000        NA         4
## 42  5                A4纸(包)      1.000        NA         4
## 43  6                A3纸(包)        NaN        NA         4
##    Safety_stock_week_Exp Safety_stock_month_Exp Safety_stock_month_Cur
## 1               11.95539               47.82154                     42
## 12               0.00000                0.00000                     -1
## 23              41.94423              167.77692                    281
## 34                    NA                     NA                      1
## 42                    NA                     NA                      6
## 43                    NA                     NA                      3
##    Conf_intv  Price Safety_stock_Days_Exp Safety_stock_Val_Exp
## 1       0.95 130.00              11.29961             6216.801
## 12      0.95   3.80               0.00000                0.000
## 23      0.95  17.55              10.88703             2944.485
## 34      0.95   8.00                    NA                   NA
## 42      0.95     NA                    NA                   NA
## 43      0.95     NA                    NA                   NA
##    Safety_stock_Val_Cur Safety_stock_Days_Cur
## 1               5460.00              9.924051
## 12                -3.80             -7.000000
## 23              4931.55             18.234067
## 34                 8.00              7.000000
## 42                   NA             42.000000
## 43                   NA                   NaN
## [1] 42
##   ST_spent_pre ST_spent_opt ST_spent_Change ST_spent_Change_ratio
## 1     11189.51     9675.444       -1514.066            -0.1353112
##   ST_days_pre ST_days_opt ST_days_Change ST_days_Change_ratio
## 1    6.970797    14.49841       7.527609             1.079878
## 'data.frame':    1 obs. of  8 variables:
##  $ ST_spent_pre         : num 11190
##  $ ST_spent_opt         : num 9675
##  $ ST_spent_Change      : num -1514
##  $ ST_spent_Change_ratio: num -0.135
##  $ ST_days_pre          : num 6.97
##  $ ST_days_opt          : num 14.5
##  $ ST_days_Change       : num 7.53
##  $ ST_days_Change_ratio : num 1.08

Storage Plot

## [1] "名称: 擦手纸(包)"
## [1] "平均月用量: 116"
## [1] "理想安全库存量: 47"
## [1] "历史安全库存量: 42"
## [1] "历史安全库存价值: 5460"
## [1] "历史安全库存天数: 9"
## [1] "理想安全库存价值: 6216"
## [1] "理想安全库存天数: 11"
## [1] "Confidence Interval: 95 %"

## [1] "名称: 清风简装200抽面巾纸(包)"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: 0"
## [1] "历史安全库存量: -1"
## [1] "历史安全库存价值: -3"
## [1] "历史安全库存天数: -7"
## [1] "理想安全库存价值: 0"
## [1] "理想安全库存天数: 0"
## [1] "Confidence Interval: 95 %"

## [1] "名称: 卷筒纸(卷)"
## [1] "平均月用量: 428"
## [1] "理想安全库存量: 167"
## [1] "历史安全库存量: 281"
## [1] "历史安全库存价值: 4931"
## [1] "历史安全库存天数: 18"
## [1] "理想安全库存价值: 2944"
## [1] "理想安全库存天数: 10"
## [1] "Confidence Interval: 95 %"

## [1] "名称: 一次性杯子"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 1"
## [1] "历史安全库存价值: 8"
## [1] "历史安全库存天数: 7"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: A4纸(包)"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 6"
## [1] "历史安全库存价值: NA"
## [1] "历史安全库存天数: 42"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: A3纸(包)"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 3"
## [1] "历史安全库存价值: NA"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 大垃圾袋(100*120)20只/包"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: 7"
## [1] "历史安全库存量: 3"
## [1] "历史安全库存价值: 118"
## [1] "历史安全库存天数: 14"
## [1] "理想安全库存价值: 279"
## [1] "理想安全库存天数: 34"
## [1] "Confidence Interval: 95 %"

## [1] "名称: 垃圾袋  90*100cm  50只/包"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 中垃圾袋(70*90)50只/卷"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: 6"
## [1] "历史安全库存量: 1"
## [1] "历史安全库存价值: 26"
## [1] "历史安全库存天数: 5"
## [1] "理想安全库存价值: 178"
## [1] "理想安全库存天数: 35"
## [1] "Confidence Interval: 95 %"

## [1] "名称: 小垃圾袋(50*60)50只/卷"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: 9"
## [1] "历史安全库存量: 7"
## [1] "历史安全库存价值: 39"
## [1] "历史安全库存天数: 26"
## [1] "理想安全库存价值: 56"
## [1] "理想安全库存天数: 37"
## [1] "Confidence Interval: 95 %"

## [1] "名称: 滴露Dettol 滋润倍护 健康抑菌洗手液"
## [1] "平均月用量: 8"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: -2"
## [1] "历史安全库存价值: -42"
## [1] "历史安全库存天数: -7"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 滴露 滋润倍护 健康抑菌洗手液补充装"
## [1] "平均月用量: 148"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 23"
## [1] "历史安全库存价值: 360"
## [1] "历史安全库存天数: 4"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 感应式洗手液补充装"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 惠润淡雅果香沐浴露 650ml"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: 0"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: 0"
## [1] "理想安全库存价值: 0"
## [1] "理想安全库存天数: 0"
## [1] "Confidence Interval: 95 %"

## [1] "名称: 水之密语 600ml 洗发水"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: 0"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: 0"
## [1] "理想安全库存价值: 0"
## [1] "理想安全库存天数: 0"
## [1] "Confidence Interval: 95 %"

## [1] "名称: 水之密语 600ml 护发素"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: 0"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 洗洁精"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 马桶 坐垫纸"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 不锈钢洁亮剂"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: NA"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 洁而亮 清新柠檬芬芳 黄色瓶 特强去污液"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: 0"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 碧丽珠 皮革护理剂"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 碧丽珠家具护理喷蜡"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 威洁士 亮净 全能清洁剂/全能水"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 玻璃清洁剂"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: -1"
## [1] "历史安全库存价值: -21"
## [1] "历史安全库存天数: -7"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 洁厕液"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: 0"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: 0"
## [1] "理想安全库存价值: 0"
## [1] "理想安全库存天数: 0"
## [1] "Confidence Interval: 95 %"

## [1] "名称: 洁厕灵"
## [1] "平均月用量: 20"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 3"
## [1] "历史安全库存价值: 18"
## [1] "历史安全库存天数: 4"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 樱花芳香粒(5粒一条)"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 4"
## [1] "历史安全库存价值: 66"
## [1] "历史安全库存天数: 28"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 静电吸尘埃剂"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 奥妙洗衣粉"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: 0"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 杀虫剂"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 2"
## [1] "历史安全库存价值: 40"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 佳丽Glade 320ml/瓶 玫瑰馨香 空气清新喷雾剂"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 1"
## [1] "历史安全库存价值: 19"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 雷达 液体蚊香液"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 雷达液体电热蚊香器+40晚蚊香液"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 超霸GP 1# 2节/卡  电池"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 5号电池"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 5"
## [1] "历史安全库存价值: 12"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 7号电池"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 2"
## [1] "历史安全库存价值: 5"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 纽扣电池(小米遥控器)"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 瑞沃洗手间喷香机补充罐"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 除甲醛喷雾"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 1"
## [1] "历史安全库存价值: 150"
## [1] "历史安全库存天数: 7"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 太古Taikoo 啡凡欣悦拼配 焙炒咖啡豆"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: NA"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 恋牌奶精"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 立顿Lipton S100红茶"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 立顿Lipton S100绿茶"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 雀巢Nestle宝路薄荷糖"
## [1] "平均月用量: 4"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: 0"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 国产 木质搅拌棒"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

## [1] "名称: 太古Taikoo优级方糖"
## [1] "平均月用量: NA"
## [1] "理想安全库存量: NA"
## [1] "历史安全库存量: 0"
## [1] "历史安全库存价值: 0"
## [1] "历史安全库存天数: NA"
## [1] "理想安全库存价值: NA"
## [1] "理想安全库存天数: NA"
## [1] "Confidence Interval: 95 %"
## geom_path: Each group consists of only one observation. Do you need to
## adjust the group aesthetic?
## Warning: Removed 1 rows containing missing values (geom_hline).

##   ST_spent_pre ST_spent_opt ST_spent_Change ST_spent_Change_ratio
## 1     11189.51     9675.444       -1514.066            -0.1353112
##   ST_days_pre ST_days_opt ST_days_Change ST_days_Change_ratio
## 1    6.970797    14.49841       7.527609             1.079878
##                       Variable     Spend
## 1  Previous Safety Stock Spent 11189.510
## 2 Optimized Safety Stock Spent  9675.444

##                      Variable      Days
## 1  Previous Safety Stock Days  6.970797
## 2 Optimized Safety Stock Days 14.498406

##                             Variable     Ratio
## 1 Ratio of Safety Stock Spend Change -13.53112
## 2  Ratio of Safety Stock Days Change 107.98778

EDA Plots

The expected plots are as following:

Conclusion

Interpretation

Strategy Recommendation